package com.face.server.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 允许进入寝室的人列表
 */
@EqualsAndHashCode(callSuper = true)
@Document
@Data
public class Joined extends Entity {

    @DBRef
    private List<FaceModel> faceModels = new ArrayList<>();

    @DBRef
    private DormitoryBuild dormitoryBuild;
    private int dormitoryBuildNum;
    private String name;
    private boolean sex; // true 男 false 女
    private int dormitoryNum;
    // 生效时间
    private Date effectDate;
    // 结束时间
    private Date endDate;
    // 身份证号
    private String identity;
    // 电话
    private String phone;

    private int type;//学生0 访问1 宿管2
}
